<?php defined('SYSPATH') OR die('No direct access allowed.');?>
<div class='common'>
<?php echo html::anchor('Thread/AddThread/' . $forumid, "Add Thread", array('class'=>'postbtn'));?>
</div>
<div id="template" class="mainbox">
    <div class="forumlist">
		<div><H3 ><strong> <?php echo $threadTitle ?></strong></H3>
		</div>
	</div>
	<div class="threadListTitle">
		<div class="itemone">标题</div>
		<div class="item">作者</div>
		<div class="item">回复/查看</div>
		<div class="itemlast">最后发表</div>
	</div>
<?php foreach($threads as $thread) {?>
	<div class="forumlistItem">
			 <div class="itemone">
			 <?php echo html::anchor('Post/PostList/' . $thread->id, $thread->thr_subject, array('class' => 'moderators')); ?>
			 </div>
			 <div class="item"><?php echo $thread->thr_author ?><br><?php echo date('d-n-Y',strtotime($thread->thr_postdate)) ?></div>
			 <div class="item"><?php echo $thread->thr_replies  ?>/<?php echo $thread->thr_hits  ?></div>
			 <div class="itemlast"><?php echo $thread->thr_lastposter  ?><br>
			 <CITE><?php echo date('d-n-Y',strtotime($thread->thr_lastpostdate)); ?></CITE> </div>
	</div>
<?php } ?>
</div>
<div class='common'>
<?php echo html::anchor('Thread/AddThread/' . $forumid, "Add Thread", array('class'=>'postbtn'));?>
</div>
<?php if(!empty($newthread)){ ?>
	<div class='common' style='border:1px solid #9DB3C5;'>
	<?php
		echo form::open_div('<h3>快速回复主题</h3>',array('class'=>'mainbox','align'=>'left'));
		echo $newthread ; 
		echo form::close_div();
	?>
	</div>
 <?php }?>